package com.ccp.dev.extend.model;

import java.util.Date;
import java.util.List;

/**
 * @Author: dfz
 * @Date: 2019/5/16 14:07
 * @Description:数据库表基本信息
 */
public class ExtendTableInfo
{
    private static final long serialVersionUID = 1L;

    /** 表名称 */
    private String tableName;

    /** 表描述 */
    private String tableComment;

    /** 表的主键列信息 */
    private ExtendColumnInfo primaryKey;

    /** 表的列名(不包含主键) */
    private List<ExtendColumnInfo> columns;

    /** 类名(第一个字母大写) */
    private String classForClassName;

    /** 类名(第一个字母小写) */
    private String classForPrefix;

    /** 表的创建时间 */
    private Date createTime;

    /** 表的修改时间 */
    private Date updateTime;

    public String getClassForClassName() {
        return classForClassName;
    }

    public void setClassForClassName(String classForClassName) {
        this.classForClassName = classForClassName;
    }

    public String getClassForPrefix() {
        return classForPrefix;
    }

    public void setClassForPrefix(String classForPrefix) {
        this.classForPrefix = classForPrefix;
    }

    public String getTableName()
    {
        return tableName;
    }

    public void setTableName(String tableName)
    {
        this.tableName = tableName;
    }

    public String getTableComment()
    {
        return tableComment;
    }

    public void setTableComment(String tableComment)
    {
        this.tableComment = tableComment;
    }

    public List<ExtendColumnInfo> getColumns()
    {
        return columns;
    }

    public ExtendColumnInfo getColumnsFirst()
    {
        ExtendColumnInfo columnInfo = null;
        if (columns != null  && columns.size() > 0)
        {
            columnInfo = columns.get(0);
        }
        return columnInfo;
    }

    public void setColumns(List<ExtendColumnInfo> columns)
    {
        this.columns = columns;
    }

    public ExtendColumnInfo getPrimaryKey()
    {
        return primaryKey;
    }

    public void setPrimaryKey(ExtendColumnInfo primaryKey)
    {
        this.primaryKey = primaryKey;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
